package com.dcm.bargain.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
 /**
 * @author:zhouyuhan
 * 时间: 2021/3/27 15:34
 */
@Data
@AllArgsConstructor
public class CutPriceEntity implements Serializable {
    /**
     * 砍价记录表的id
     */
    private Long id;
    /**
     * 发起砍价的用户
     */
    private Long uid;
    /**
     * 砍价商品id
     */
    private Long bid;
    /**
     * 帮助砍价的用户 （1，2，。。。）
     */
    private String helper;
    /**
     * 照片
     */
    private String images;
    /**
     * 砍价商品名称
     */
    private String productName;
    /**
     * 商品介绍
     */
    private String introduce;
    /**
     * 剩余砍价金额
     */
    private BigDecimal price;
    /**
     * 总共砍价次数
     */
    private Integer sumNum;
    /**
     * 剩余多少次砍成
     */
    private Integer remainNum;
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;
    /**
     * 状态
     */
    private Integer status;

    public CutPriceEntity() {

    }

    public CutPriceEntity(Long uid, Long bid, Integer sumNum, Integer remainNum, Date startTime, Integer status) {
        this.uid = uid;
        this.bid = bid;
        this.sumNum = sumNum;
        this.remainNum = remainNum;
        this.startTime = startTime;
        this.status = status;
    }
}
